﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Build.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.FullTextIndex.Build" %>

<!doctype html>
<html>
<head runat="server">
    <title>建立全文索引</title>
    <meta charset="utf-8" />
    <meta http-equiv="Pragma" content="no-cache" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>


    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <link rel="stylesheet" type="text/css" href="Build.css" />

    <script type="text/javascript" language="javascript">
        function PercentChange(pageCount, pageTotal, kongJian) {

            $get(kongJian).style.width = pageCount * (600 / pageTotal) + "px";
            $get(kongJian).innerText = (pageCount / pageTotal * 100).toPrecision(4).toString() + "%";
            $get(kongJian).title = "当前进度量：" + pageCount;
            $get("ProgressNum").innerText = pageCount;
            $get("ProgressTotal").innerText = pageTotal;

            if (pageCount > 0 && pageCount != pageTotal) {
                $get("Message").innerText = "正在生成";
            }
            if (pageCount == pageTotal) {
                $get("Message").innerText = "生成完成";
            }
        }
        function Message(str) {
            $get("Message").innerText = str;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="3000">
                </asp:Timer>
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                <br />
                <fieldset>
                    <legend>使用 WinnerCMS 内置功能</legend>
                    <p style="text-align: center">
                        <asp:RadioButtonList ID="RBL_Seep" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="25">最慢</asp:ListItem>
                            <asp:ListItem Value="20">较慢</asp:ListItem>
                            <asp:ListItem Value="15">一般</asp:ListItem>
                            <asp:ListItem Value="10">较快</asp:ListItem>
                            <asp:ListItem Value="0" Selected="True">全速</asp:ListItem>
                        </asp:RadioButtonList>
                        <asp:Button ID="btnOK" runat="server" Text="建立索引" CssClass="btn btn-default" OnClick="btnOK_Click" />
                    </p>
                    <div class="Column">
                        <div class="Progress" id="Bar1">
                        </div>
                    </div>
                    <br />
                    <br />
                    <div style="text-align: center; font-weight: bold;">
                        <div id="Message">
                        </div>
                        <span id="ProgressNum">0</span> / <span id="ProgressTotal">0</span>
                    </div>
                </fieldset>
                <br />
                <br />
                <fieldset>
                    <legend>使用 WinnerCMS Indexer 插件</legend>
                    <div style="text-align: center; font-weight: bold;">
                        <asp:Button ID="btnOK1" runat="server" Text="建立索引" CssClass="btn btn-default" OnClick="btnOK1_Click" />
                    </div>
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
